<?php
	require_once('useraccesscontrol.class.php');

	$message = null;
	if (isset($_POST['loginsubmit'])) {
		$userAccessControl = new UserAccessControl();
		$userAccessControl->grantModAccess($_POST['password']);
		$message = 'Das war nicht das richtige Passwort.';
	}
?>
<html>
	<head>
		<title>Login</title>
		<link rel="stylesheet" type="text/css" href="style.css">
	</head>
	<body>
		<h1>Login</h1>
		<?php if (null !== $message): ?>
			<p class="message"><?php echo($message); ?></p>
		<?php endif; ?>
		<form action="login.php" method="post"><div>
			<label for="password">Passwort:</label> <input type="password" name="password" />
			<input type="submit" name="loginsubmit" value="Einloggen" />
		</div></form>
		<div id="bottomlinks">
			<a href="index.php">Zur&uuml;ck zur Startseite</a>
		</div>
	</body>
</html>